package com.pansky.crm.service;

import com.pansky.crm.common.mybatisplus.ApiResult;
import com.pansky.crm.common.mybatisplus.SuperService;
import com.pansky.crm.entity.Department;
import com.pansky.crm.entity.vo.DepartmentVO;

import java.util.List;

/**
 * @author ：zhouzhiyong
 * @date ：Created in 2021/2/26 9:31
 * @description：部门service
 */
public interface DepartmentService extends SuperService<Department> {

    /**
     * 获取所有部门和员工信息
     *
     * @param departmentName
     * @return
     */
    ApiResult<List<DepartmentVO>> listAllDepartmentEmployee(String departmentName);
    /**
     * 上下移动
     *
     * @param departmentId
     * @param swapId
     * @return
     */
    ApiResult<Boolean> upOrDown(Integer departmentId, Integer swapId);
    /**
     * 部门升级
     *
     * @param departmentId
     * @return
     */
    ApiResult<Boolean> upgrade(Integer departmentId);
    /**
     * 部门降级
     *
     * @param departmentId
     * @param preId
     * @return
     */
    ApiResult<Boolean> downgrade(Integer departmentId, Integer preId);

    ApiResult<Boolean> removeByDepartmentId(Integer departmentId);
}
